const exam = {
	namespaced: true,
	state: {
		list:[],
		num:0
	},
	mutations: {
		SET_LIST(state,list) {
			state.list=list
		},
		SET_NUM(state,num) {
			state.num=num
		}
	},
	actions: {
		async GET_LIST({commit}) {
			let res=await uni.request({
				url:"http://localhost:3030/exam/randomList",
				method:"get"
			})
			commit('SET_LIST',res[1].data.data)
		},
		GET_NUM({commit},num) {
			commit('SET_NUM',num)
		}
	}
}
export default exam
